<!-- inc:frame.top -->

<div class="position"><p><!-- inc:position --> &raquo; <a href="{:$mainlink}?file=sysgroup&act=list">管理系统组</a> &raquo; {:$groupname} &raquo; <a href="{:$mainlink}?file=sysgroup&act=fieldlist&sysgroupid={:$sysgroupid}">字段管理</a> &raquo; <!-- if($act=="fieldadd") -->添加字段<!-- elseif($act=="fieldmodify") -->字段编辑<!-- end --></p><!-- inc:position.fr --></div>

<div class="page_pad">
  <form method="post" action="{:$mainlink}?file=sysgroup&act=fieldsetok&sysgroupid={:$sysgroupid}" onsubmit="return chkset(this);">
  <input type="hidden" name="id" value="{:$id}" />
  <div class="content_box">
    <div class="content_bor">
      <table class="ctable">
        <tr>
          <td class="left">审核：</td>
          <td class="right">
            <input type="radio" name="ifcheck" value="1" {if($rs[id])}{if($rs[ifcheck]==1)}checked{end}{else}checked{end}>已审核
            &nbsp;
            <input type="radio" name="ifcheck" value="0" {if($rs[id] && $rs[ifcheck]==0)}checked{end}>未审核
            &nbsp;
            <span class="clue_on">[未审核信息在前台无法看到]</span>
          </td>
        </tr>
        <tr>
          <td class="left">唯一标识：<span style="color:red;">*</span></td>
          <td class="right">
            <input class="ginput" type="text" name="sign" value="{:$rs[sign]}" />
            <span class="club_on"> [不少于3个英文小写字母，用于前台调用]</span>
          </td>
        </tr>
        <tr>
          <td class="left">字段名称：</td>
          <td class="right">
            <!--if($system[jianti] == on) -->
            <input class="ginput" type="text" name="field_name" style="width:70px;" value="{:$rs[field_name]}" placeholder="简体" />
            <!-- end -->
            <!--if($system[english] == on) -->
            <input class="ginput" type="text" name="field_name_en" style="width:70px;" value="{:$rs[field_name_en]}" placeholder="英文" />
            <!-- end -->
            <!--if($system[fanti] == on) -->
            <input class="ginput" type="text" name="field_name_ft" style="width:70px;" value="{:$rs[field_name_ft]}" placeholder="繁体" />
            <!-- end -->
            &nbsp;
            [字段说明，例：数量、尺寸]
          </td>
        </tr>
        <tr>
          <td class="left">字段类型：</td>
          <td class="right">
            <select id="field_type" name="field_type">
              <option {if($rs[field_type]=="text")}selected{end} value="text">文本框</option>
              <option {if($rs[field_type]=="select")}selected{end} value="select">下拉框</option>
              <option {if($rs[field_type]=="checkbox")}selected{end} value="checkbox">复选框</option>
              <option {if($rs[field_type]=="textarea")}selected{end} value="textarea">文本域</option>
              <option {if($rs[field_type]=="editor")}selected{end} value="editor">编辑器</option>
              <option {if($rs[field_type]=="date")}selected{end} value="date">日期</option>
              <!--<option {if($rs[field_type]=="picture")}selected{end} value="picture">图片</option>-->
              <option {if($rs[field_type]=="file")}selected{end} value="file">附件</option>
            </select>
          </td>
        </tr>
        <tr id="field_extra_date" style="display:none;">
          <td class="left">日期格式：</td>
          <td class="right">
            <select id="date_type">
              <option value="1">日期: 2018-05-30</option>
              <option value="2">日期+时间 2018-05-30 16:20:00</option>
            </select>
          </td>
        </tr>
        <tr>
          <td class="left">是否共用参数：</td>
          <td class="right"><input type="checkbox" name="ifshare" {if($rs[ifshare])}checked{end}> [多个语言版本是否共用同个参数]</td>
        </tr>
        <tr>
          <td class="left">选项值：</td>
          <td class="right">
            <input class="ginput" type="text" name="field_option" value="{:$rs[field_option]}" />
            &nbsp;
            [多个选项用英文逗号隔开]
          </td>
        </tr>
        <tr>
          <td class="left">备注：</td>
          <td class="right"><input class="ginput" type="text" name="note" value="{:$rs[note]}" /></td>
        </tr>
      </table>
    </div>
  </div><!--content_box-->
  
  <div class="gbutton_div"><button type="submit" class="gbutton gbutton_dblue gbutton_add" id="creat_button">确认</button> &nbsp; <button type="button" class="gbutton gbutton_add" onclick="qgurl('{:$mainlink}?file=sysgroup&act=fieldlist&sysgroupid={:$sysgroupid}')">返回</button> &nbsp; <span id="show_step" style="color:red;"><img src="images/loading.gif" style="visibility:hidden;" /></span></div>
  </form>
</div><!--page_pad-->

<script language="JavaScript">
/*需求不大暂时不开发
function field_date_type()
{
	field_typeval = get_selected("field_type");
	if(field_typeval=="date")
	{
		document.getElementById("field_extra_date").style.display="";
	}
	else
	{
		document.getElementById("field_extra_date").style.display="none";
	}
}
field_date_type();*/

function chkset(o)
{
	if(!o.sign.value)
	{
		tip_msg("标识不能为空！");
		return false;
	}
	<!-- if($system[jianti] == on) -->
	if(!o.field_name.value)
	{
		tip_msg("字段名称不能为空！");
		return false;
	}
	<!-- end -->
	document.getElementById("show_step").innerHTML = "<img src='images/loading.gif' border='0' align='absmiddle'> 正在保存数据，如果网页没有动静请刷新...";
	document.getElementById("creat_button").disabled=true;
}
</script>

<!-- inc:frame.bottom -->